In ax, the base types of the edt type of the quantity and amount are both real. Although the EDT type is created, the selection is real, which is actually called decimal, because this type of EDT is translated into the numbric type in SQL Server,
1.1.1 The definition of the decimal point for the item unit
As shown in the following illustration, the transaction code cuni the unit and the decimal point of the item, and the decimal point can be set at icon 1, Icon 2.
Icon 1: Represents the
There is no myth. Let's talk about decimal's "blind eye" and decimal's blind eye.0x00 Preface
In the last article "compromise and trade-offs, deconstruct decimal operations in C #", many of my friends talked about the decimal type in C. In fact, the
Put C # in detail: compromise and trade-offs, deconstruct the decimal operation in C,Digress
Before the beginning of the text, I would like to thank the blog Park for providing this outstanding platform. I am honored to have won the Microsoft MVP
A description of the problemIn development, you need to keep the decimal type of data two decimal places after the decimal point and do not need to be rounded, that is, directly intercept the two decimal places after the decimal point.
See the topic believe that a lot of small partners will think of using rounding method to achieve, this is also a way, then there are other methods, we will take you to understand the PHP implementation of two decimal places to save several
Explanation: mutual conversion of binary, octal, decimal, and hexadecimal values: in addition to the remainder of 2, the integers are arranged in reverse order, that is, each time an integer is divided by 2, and the remainder is the number on the
Mode one:RoundedDouble F = 111231.5585;Rounding to keep two decimal digits, you can use the Format function of string,The method is as follows:
Copy Code code as follows:
System.out.println (String.Format ("%.2f", X1));
Scenario 1:C # retains 2 decimal places. ToString ("F2") is OK, but if the number is three digits behind the decimal point such as 1.253, then the conversion will become 1.25. Can you just keep it to the last place, not 0?By default, 2 bits are
This problem has plagued me for a lot of time. I have a clear understanding recently and want to share it with you.
This problem begins with the digital representation. The decimal number 123 we see today is a natural understanding of its meaning,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.